﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GioHangx.ascx.cs" Inherits="XLDL.Includes.GioHang1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<table cellpadding="0" cellspacing="0" border="0" class="table">
			<tr><td class="td">
				<table cellpadding="0" cellspacing="0" border="0" class="table2">
					<tr><td class="td2">
						<table cellpadding="0" cellspacing="0" border="0" class="table3">
							<tr><td class="td3">
								<table cellpadding="0" cellspacing="0" border="0" class="table4">
									<tr><td class="content_wrapper_td">	
<!-- Welcome_box_start -->
     <!--   <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr><td class="main"></td></tr>
          <tr><td></td></tr>
          <tr><td class="main"></td></tr>
        </table>  -->
       		
 
                                        
<!-- Welcome_box_end -->
                                       <cc1:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender3" runat="server"
                TargetControlID="updateProgress1" VerticalSide="Middle" HorizontalSide="Center"
                VerticalOffset="10" HorizontalOffset="10" ScrollEffectDuration=".1">
            </cc1:AlwaysVisibleControlExtender> 
                                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="Up_1" >
                                        <ProgressTemplate>
                                        <div style="background-color:White">
                                            <asp:Image ID="Image_loading" runat="server" ImageAlign="AbsMiddle" 
                                                ImageUrl="~/WRss/indicator.gif" />
                                        <span style="color:Blue;font-size:14px">Xin vui lòng chờ trong giây lát...</span>
                                        </div>
                                        </ProgressTemplate>
                                        </asp:UpdateProgress>	
                                        <asp:UpdatePanel ID="Up_1" runat="server" UpdateMode="Conditional" >
                                        <Triggers> 
                                        <asp:AsyncPostBackTrigger ControlID="ImageButton_mua" EventName="Click"/>
                                        <asp:AsyncPostBackTrigger ControlID="ImageButton_huy" EventName="Click"/>
                                        <asp:AsyncPostBackTrigger ControlID="luoi_gio_hang" EventName="RowDataBound"/>
                                        </Triggers>
                                        <ContentTemplate>
						
				<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="cont_heading_table">
  <tr valign="middle">
    <td  class="cont_heading_td" align="center" style="vertical-align:middle">
                <asp:Image ID="Image_giohang" runat="server" ImageAlign="AbsMiddle" 
            ImageUrl="~/Images/Cart.png" Width="50px" /><asp:Label ID="lbl_giohang" runat="server" Text="Giỏ hàng của Bạn"></asp:Label></td>
  </tr>
</table>


  <table cellpadding="0" cellspacing="0" border="0" class="content_wrapper3_table">
		<tr><td class="content_wrapper3_td" align="center" valign="middle">          
	
	<table width="100%" border="0px" style="padding-right: 17px;" align="center">
    <tr align="center">
        <td align="center" valign="middle"> <asp:Panel ID="Panel_thanhtoan" runat="server" Visible="False"
                BackColor="White" BorderStyle="None">
          <table cellspacing="1" border="0" cellpadding="1" width="100%"  class="kh">
                                                                           <tr valign="bottom">
                                                                                            <td align="left">
                                                                                                Họ tên: </td>
                                                                                            <td align="left" valign="middle">
                                                                                                <asp:TextBox ID="txt_hoten" runat="server" Width="200px"></asp:TextBox>
                                                                                                *</td>
                                                                                        </tr>
                                                                                        <tr valign="middle">
                                                                                            <td align="left" valign="middle">
                                                                                                Giới tính:</td>
                                                                                            <td align="left" valign="middle">
                                                                                                &nbsp;<asp:RadioButton ID="rd_nam" runat="server" 
                                                                                                    Text="Nam" Checked="True" 
                                                                                                    GroupName="gt" />
                                                                                                &nbsp;<asp:RadioButton ID="rd_nu" runat="server" 
                                                                                                     Text="Nữ" GroupName="gt" />
                                                                                                &nbsp;</td>
                                                                           </tr>
                                                                                        <tr valign="middle">
                                                                                            <td align="left" valign="middle">
                                                                                                Địa chỉ:</td>
                                                                                            <td align="left" valign="middle">
                                                                                                <asp:TextBox ID="txt_diachi" runat="server" Width="300px"></asp:TextBox>
                                                                                                *</td>
                                                                                        </tr>
                                                                                        <tr valign="middle">
                                                                                            <td align="left" valign="middle" width="90">
                                                                                                Điện thoại:</td>
                                                                                            <td align="left" valign="middle">
                                                                                                <asp:TextBox ID="txt_dienthoai" runat="server" Width="150px"></asp:TextBox>
                                                                                                *</td>
                                                                                        </tr>
                                                                                        <tr valign="middle">
                                                                                            <td align="left" valign="middle" width="90">
                                                                                                Email:</td>
                                                                                            <td align="left" valign="middle">
                                                                                                <asp:TextBox ID="txt_email" runat="server" Width="200px"></asp:TextBox>
                                                                                            </td>
                                                                           </tr>
                                                                                        <tr valign="middle">
                    <td align="left" valign="top" width="110">Thông tin thêm:</td>
                                                                                            <td align="left" valign="middle">
                                                                                                <asp:TextBox ID="txt_thongtinthem" runat="server" Height="120px" 
                                                                                                    TextMode="MultiLine" Width="300px"></asp:TextBox>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr valign="middle">
                                                                                            <td align="left" colspan="2" valign="middle">
                                                                                                 Vui lòng nhập chính xác các thông tin (*) bắt buộc ở trên. </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td>
                                                                                                &nbsp;</td>
                                                                                            <td>
                                                                                                &nbsp;</td>
                                                                                        </tr>
                                                                                    <tr>
                                                                                        <td align="right">
                                                                                            <asp:ImageButton ID="ImageButton_huy" runat="server" 
                                                                                                ImageUrl="~/Images/huy.gif" onclick="ImageButton_huy_Click" />
                                                                                        </td>
                                                                                        <td align="left" style="padding-left:5px">
                                                                                            <asp:ImageButton ID="ImageButton_mua" runat="server" 
                                                                                                ImageUrl="~/Images/Mua_2.gif" onclick="ImageButton_mua_Click" 
                                                                                                onclientclick="return kt2();" />
                                                                                        </td>
                </tr>
                                                                                    <tr>
                                                                                        <td align="right">
                                                                                            &nbsp;</td>
                                                                                        <td align="left" style="padding-left:5px">
                                                                                            &nbsp;</td>
                                                                           </tr>
                                                                                    </table><div id="del"></div>
                        </asp:Panel>
          
                                                                                </td>
    </tr>
    <tr>
        <td align="center">
            <asp:Label ID="lbl_thongbao" runat="server" Text="Chưa có Sản phẩm !!!" 
                Visible="False" CssClass="kh"></asp:Label>
        </td>
        
    </tr>
   
                                        
    <tr>
        <td align="center">
            <asp:GridView ID="luoi_gio_hang" runat="server" AutoGenerateColumns="False" 
                BorderWidth="1px" onrowcancelingedit="luoi_gio_hang_RowCancelingEdit" 
                onrowcommand="luoi_gio_hang_RowCommand" onrowediting="luoi_gio_hang_RowEditing" 
                onrowupdating="luoi_gio_hang_RowUpdating" 
                BorderColor="#DA0750" onrowdatabound="luoi_gio_hang_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <EditItemTemplate>
                            <table cellpadding="0" cellspacing="0" class="style2">
                                <tr>
                                    <td align="center" valign="middle">
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("STT") %>'></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0" class="style2">
                                <tr>
                                    <td align="center" valign="middle">
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("STT") %>'></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        <HeaderStyle ForeColor="#DA0750" HorizontalAlign="Center" 
                            VerticalAlign="Middle" Width="10px" BorderWidth="1px" CssClass="hgio" 
                            Font-Size="10pt" />
                        <ItemStyle BorderColor="#DA0750" Font-Size="14px" HorizontalAlign="Center" 
                            VerticalAlign="Middle" CssClass="gio" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên Sản phẩm">
                        <EditItemTemplate>
                            <asp:HyperLink ID="link_tensp" runat="server" ForeColor="Black" 
                                NavigateUrl='<%# "~/index.aspx?act=chitiet&id="+Eval("id_sp")+"&nid="+Eval("id_nhom_sp")+"&ss="+Eval("so_size")+"&Gt="+Eval("id_gt") %>' 
                                Text='<%# Eval("ten_sp")+" (MS"+Eval("id_sp")+")" %>'></asp:HyperLink>
                        </EditItemTemplate>
                        <AlternatingItemTemplate>
                            <asp:HyperLink ID="link_tensp" runat="server" ForeColor="Black" 
                                NavigateUrl='<%# "~/index.aspx?act=chitiet&id="+Eval("id_sp")+"&nid="+Eval("id_nhom_sp")+"&ss="+Eval("so_size")+"&Gt="+Eval("id_gt") %>' 
                                Text='<%# Eval("ten_sp")+" (MS"+Eval("id_sp")+")" %>'></asp:HyperLink>
                        </AlternatingItemTemplate>
                        <ItemTemplate>
                        
                          <asp:HyperLink ID="link_tensp" runat="server" Text='<%# Eval("ten_sp")+" (MS"+Eval("id_sp")+")" %>'                          
                                
                                NavigateUrl='<%# "~/index.aspx?act=chitiet&id="+Eval("id_sp")+"&nid="+Eval("id_nhom_sp")+"&ss="+Eval("so_size")+"&Gt="+Eval("id_gt") %>' 
                                ForeColor="Black"></asp:HyperLink>
                         
                        </ItemTemplate>
                        <HeaderStyle CssClass="Hgio" />
                        <ItemStyle CssClass="gio" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Giới tính">
                        <ItemTemplate>
                          <asp:Label ID="Label3" runat="server" Text='<%# Eval("gioi_tinh_sp") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="Hgio" />
                        <ItemStyle CssClass="gio" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Size">
                        <EditItemTemplate>
                            <asp:TextBox ID="txt_size" runat="server" Text='<%# Eval("so_size") %>' 
                                Visible="False" Width="20px"></asp:TextBox>
                            <asp:DropDownList ID="drop_so_size" runat="server" 
                                Font-Size="Small" 
                                Width="45px">
                            </asp:DropDownList>
                            <asp:Label ID="lbl_id_sp" runat="server" 
                                Text='<%# Eval("ID_SP") %>' Visible="False"></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbl_id_size" runat="server" Text='<%# Eval("so_size") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="Hgio" />
                        <ItemStyle CssClass="gio" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Số lượng">
                        <EditItemTemplate>
                            <asp:TextBox ID="txt_soluong" runat="server" Text='<%# Bind("so_luong") %>' 
                                Font-Size="Small" Width="50px"></asp:TextBox>
                            <asp:Label ID="lbl_id" runat="server" Text='<%# Eval("id") %>' Visible="False"></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("so_luong") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="Hgio" />
                        <ItemStyle CssClass="gio" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="gia_sp" HeaderText="Đơn giá" ReadOnly="True" 
                        DataFormatString="{0:#,##0}" >
                        <HeaderStyle CssClass="Hgio" />
                        <ItemStyle CssClass="gio" />
                    </asp:BoundField>
                    <asp:BoundField DataField="thanh_tien" HeaderText="Thành tiền" 
                        ReadOnly="True" DataFormatString="{0:#,##0}" >
                        <HeaderStyle CssClass="Hgio" />
                        <ItemStyle CssClass="gio" />
                    </asp:BoundField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <table cellpadding="0" cellspacing="0" class="style2">
                                <tr>
                                    <td>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                            CommandName="Update" 
                                            onclientclick="return confirm('Bạn có chắc là muốn thay đổi thông tin này ?');" 
                                            Text="Lưu"></asp:LinkButton>
                                    </td>
                                    <td>
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                            CommandName="Cancel" Text="Không"></asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                CommandName="Edit" Text="Sửa"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle BorderColor="#DA0750" HorizontalAlign="Center" 
                            VerticalAlign="Middle" />
                        <ItemStyle CssClass="gio" HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <table cellpadding="0" cellspacing="0" class="style2">
                                <tr>
                                    <td align="center">
                                        <asp:ImageButton ID="ImageButton_xoa" runat="server" CommandName="xoa" 
                                            ImageUrl="~/Images/Xoa.jpg" Width="23px"  
                                            onclientclick="return confirm('Bạn có chắc là muốn xoá Sản phẩm này ?');" />
                                    </td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="center">
                                        <asp:CheckBox ID="CheckBox_xoa" runat="server" 
                                           />
                                        <asp:Label ID="lbl_id_" runat="server" Text='<%# Eval("ID") %>' Visible="False"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        <HeaderStyle CssClass="gio" />
                        <ItemStyle CssClass="gio" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td align="center">
        <asp:Panel ID="Panel_thongtin" runat="server" Font-Bold="False" Font-Size="15px">
         <table width="200px">
                <tr>
                    <td align="right" width="50%" style="font-weight:bold">
                        Tổng số mặt hàng:</td>
                    <td align="left">
                        <asp:Label ID="lbl_tongmathang" runat="server" Text="0" Font-Bold="True"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="50%" style="font-weight:bold">
                        Tổng số lượng:</td>
                    <td align="left">
                        <asp:Label ID="lbl_tongsoluong" runat="server" Text="0" Font-Bold="True"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="font-weight:bold">
                        Tổng số tiền:</td>
                    <td align="left">
                        <asp:Label ID="lbl_tongtien" runat="server" Text="0 VNĐ" Font-Bold="True"></asp:Label>
                    </td>
                </tr>
                <tr >
                    <td align="right">
                        &nbsp;</td>
                    <td align="left">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" style="padding-top:10px">
                        <asp:ImageButton ID="ImageButton_ttmua" runat="server" 
                            ImageUrl="~/Images/tieptucmuahang.gif" onclick="ImageButton_ttmua_Click" />
                    </td>
                    <td align="left" style="padding-top:10px; padding-left:3px">
                        <asp:ImageButton ID="ImageButton_ttthanhtoan" runat="server" 
                            ImageUrl="~/Images/tieptucthanhtoan.gif" 
                            onclick="ImageButton_ttthanhtoan_Click" />
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
</asp:Panel>

           
        </td>
    </tr>
</table>
        
</td>

</tr>

  </table>		
  
   </ContentTemplate>
                                        </asp:UpdatePanel>               

				 
</td></tr></table>
							</td></tr>
						</table>									
					</td></tr>
				</table>
			</td></tr>
		</table>
<div id="mystickytooltip" class="stickytooltip">
<div style="padding:5px">
    <asp:Label ID="lbl_tooltip" runat="server"></asp:Label>

</div>
</div>


 


